<style scoped>
   a.link{
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
  }
  .layout{
    border: 1px solid #d7dde4;
    background: #f5f7f9;
    position: relative;
    overflow: hidden;
    height: 100%;
  }
  .layout-breadcrumb{
    padding: 10px 15px 0;
  }
  .layout-content{
    min-height:300px;
    margin: 15px;
    overflow: hidden;
    background: #fff;
    border-radius: 4px;
  }
  .layout-content-main{
    padding: 10px;
  }
  .layout-copy{
    text-align: center;
    padding: 10px 0 20px;
    color: #9ea7b4;
  }
  .layout-menu-left{
    background: #464c5b;
  }
  .layout-header{
    height: 60px;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
  }
  .layout-logo-left{
    width: 90%;
    height: 30px;
    background: #5b6270;
    border-radius: 3px;
    margin: 15px auto;
  }
  .ivu-row-flex{height: 100%}
  .ivu-form.ivu-form-label-right{padding-bottom: 100px}
</style>
<template>
  <div class="layout">
    <Row type="flex">
      <i-col span="4" class="layout-menu-left">
        <Menu active-name="1-2" theme="dark" width="auto" :open-names="['1']" @on-select="MenuSelect">
          <div class="layout-logo-left"></div>
          <Submenu name="1" v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
            <template slot="title">
              <Icon :type="item.iconType"></Icon>
              {{ item.name }}
          </template>
            <Menu-item
               v-for="(item,index) in item.children"
               :name="item.path"
               v-if="!item.hidden"
            >
              {{ item.name }}
            </Menu-item>
          </Submenu>
        </Menu>
      </i-col>
      <i-col span="20" style="overflow: auto">
        <!--<div class="layout-header"></div>-->
        <div class="layout-breadcrumb">
          <Breadcrumb>
            <Breadcrumb-item href="#">首页</Breadcrumb-item>
            <Breadcrumb-item href="#">应用中心</Breadcrumb-item>
            <Breadcrumb-item>某应用</Breadcrumb-item>
          </Breadcrumb>
        </div>
        <div class="layout-content">
          <div class="layout-content-main">
            <router-view></router-view>
          </div>
        </div>
      </i-col>
    </Row>
  </div>
</template>
<script>
  export default {
    data () {
      return {}
    },
    methods: {
      MenuSelect (name) {
        this.$router.push({ path: name })
      }
    }
  }
</script>
